﻿var SystemRouter = Backbone.Router.extend({
    /* define the route and function maps for this router */
    routes: {
        "": "Arena"
    },
    Arena: function () {
        var arenaModel = new ArenaModel();
        var view = new ArenaView({ model: arenaModel });
    }
});

$(function () {
    window.systemRouter = new SystemRouter();
    window.urlPrefix = "samplerdev";
    Backbone.history.start({ pushState: true, root: "/" + window.urlPrefix });
    $("a").live("click", function (e) {
        window.systemRouter.navigate($(this).attr("href").toLowerCase().replace(window.urlPrefix, ""));
        Backbone.history.loadUrl();
        e.preventDefault();
    });
});